#ifndef __ROCKS_H__2010
#define __ROCKS_H__2010
#include <SDL/SDL.h>
#include "rockdodger_globals.h"

/*! \brief Structure describing rocks/asteroids
 */
struct rock_struct {
  float x, y, xvel, yvel;
  int active;
  SDL_Surface *image;
  int type_number;
  float heat;

  // rock_struct.greeb is an index into greeb[], the destination (or landing
  // site) of the rock's greeb. This of course limits the number of greebs
  // flying to the same rock.
  int greeb;

};

extern struct rock_struct rock[MAX_ROCKS]; //!< Structure of all the rocks.

extern SDL_Surface *surf_rock[NROCKS];	//!< THE ROCKS
extern SDL_Surface *surf_deadrock[NROCKS]; //!< THE DEAD ROCKS (blank white rocks)

/*! \brief Draw the rocks.
 *
 * This function will also draw the greeblies flying to its
 * rock. TODO: Check if this can be untangled.
 *
 * \param surf_screen Surface to draw on.
 */
void display_rocks(SDL_Surface *surf_screen);

/*! \brief Create a rock.
 *
 * Create a rock, if maximum number of rocks reached function returns
 * immediately.
 *
 * \param rockspeed current default speed of the rock, modified by a random amount
 */
void create_rock(float rockspeed);

#endif
